﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using SXFramWork.Core;
using SXFramWork.Model;
using SXFramWork.Service;

namespace SXFramWork.API.Controllers.Admin
{
    /// <summary>
    /// 日志管理
    /// </summary>
    public class SysLogController : WebController
    {
        private readonly ISysLogService _service;
        private readonly IWebHostEnvironment _env;
        public SysLogController(ISysLogService sysLogService,IWebHostEnvironment webHostEnvironment)
        {
            _env = webHostEnvironment;
            _service = sysLogService;
        }
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        [Menu("系统日志")]
        [HttpGet]
        public async Task<IApiResult> List([FromQuery]LogQueryModel model)
        {
            return await _service.Query(model);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        [Power("删除")]
        [HttpPost]
        public async Task<IApiResult> Delete([FromBody] string ids)
        {
            return await _service.Delete(ids);
        }

       
    }
}